package com.dolawing.phonecallapp;

import android.app.Application;

import com.dolawing.phonecallapp.listenphonecall.AlarmSettings;

public class App extends Application {
    //录音文件名称信息
    private String recordAudioName;
    private int oldState = 0;
    private static AlarmSettings AlarmSetingSingle;
    private static App INSTANCE ;
    @Override
    public void onCreate() {
        super.onCreate();
        INSTANCE = this;
    }

    public static App getInstance(){
        return INSTANCE;
    }

    //闹钟
    public static AlarmSettings getAlarmInstance(){
        if (AlarmSetingSingle == null){
            synchronized (App.class){
                if (AlarmSetingSingle == null){
                    AlarmSetingSingle = new AlarmSettings();
                }
            }
        }
        return AlarmSetingSingle;
    }

    public String getRecordAudioName() {
        return recordAudioName;
    }

    public void setRecordAudioName(String recordAudioName) {
        this.recordAudioName = recordAudioName;
    }

    public int getOldState() {
        return oldState;
    }

    public void setOldState(int oldState) {
        this.oldState = oldState;
    }

}
